package com.CST.mapper.cst.cb;

import com.CST.entity.cb.BdSysMenu;
import com.CST.vo.cb.BdSysMenuVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>菜单 Mapper接口</p>
 *
 * @author: y
 * @create: 2021-09-27 14:44
 **/
@Mapper
@Repository
public interface BdSysMenuMapper extends BaseMapper<BdSysMenu> {

    @Select("select * from BD_SysMenu where MENU_NAME=#{id}")
    List<BdSysMenu> getSyeMenu(String id);

    @Select("select * from BD_SysMenu where id=#{id} ")
    BdSysMenu getSysMenuParentId(String id);

    /**
     * 更新菜单表
     *
     * @param bdSysMenu
     * @return int
     *
     * @author y
     * @since 2021/09/27 17:06
     */
    boolean updateSysMenu(BdSysMenu bdSysMenu);

    @Select("select * from BD_SysMenu where DEL_FLAG='0'")
    List<BdSysMenuVO> getSysMenu();


    List<BdSysMenuVO> selectMenu(String name);

    BdSysMenuVO selectMenuInfo(String id);
}